﻿using datatablegenerator.Enums;

namespace datatablegenerator.Factory.DBFactory
{
    public class DBProviderFactoey
    {
        public static IDbContext CreateDbContext(DBType dBType)
        {
            IDbContext iDbContext = null;
            switch (dBType)
            {
                case DBType.SqlServer:
                    iDbContext = new Provider.SqlServerProvider();
                    break;
                case DBType.MySql:
                    iDbContext = new Provider.MySqlProvider();
                    break;
                default:
                    break;
            }
            return iDbContext;
        }

    }
}
